package cn.billy.basic.service;

import cn.billy.basic.query.BaseQuery;
import cn.billy.basic.utils.PageList;

import java.util.List;

public interface IBaseService<T> {
    /*
     * @Title: loadAll
     * @Description: 查询所有
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:16
     * @Parameters:
     * @Return List
     */
    List<T> loadAll();

    /*
     * @Title: getById
     * @Description: 根据Id查询
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:16
     * @Parameters:
     * @Return Department
     */
    T getById(Long id);

    /*
     * @Title: remove
     * @Description: 根据Id删除
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:18
     * @Parameters:
     * @Return void
     */
    void remove(Long id);

    /*
     * @Title: save
     * @Description: 新增
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:18
     * @Parameters:
     * @Return void
     */
    void save(T t);

    /*
     * @Title: update
     * @Description: 根据Id修改
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:19
     * @Parameters:
     * @Return void
     */
    void update(T t);

    /*
     * @Title: queryData
     * @Description: 分页+高级查询
     * @Author: Billy
     * @Version: 1.0
     * @Date:  2022/6/21 21:19
     * @Parameters:
     * @Return PageList
     */
    PageList<T> queryData(BaseQuery baseQuery);

    void batchDel(Long[] ids);
}
